<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.min.js"></script>
</head>
<body>
<div id="app">
    <p v-show="show">这是一段文本</p>
    <button v-on:click="handleClose">点击隐藏</button>
</div>
</body>
<script>
    var yyf = new Vue({
        el: '#app',
        data: {show: true},
        methods: {
            handleClose: function () {
                this.show=this.show ? false : true;
            }
        }
    })
</script>
</html>